package com.rockcent.service;

import com.rockcent.mall.lib.domain.MessageAutoreply;
import com.rockcent.mall.lib.domain.MessageReplyRule;
import com.rockcent.mall.lib.domain.MessageReplyRuleContent;
import com.rockcent.mall.lib.domain.MessageReplyRuleKeyword;
import com.rockcent.mall.lib.dto.MessageAutoreplyDto;
import com.rockcent.mall.lib.dto.MessageReplyRuleDto;

import java.util.List;

/**
 * Created by marco on 2017/5/24.
 */
public interface MallWechatMessageConfigService {

    MessageAutoreply findByCodeAndMallId(String code, Long mallId);

    void saveOrUpdate(MessageAutoreplyDto dto);

    void delete(String code, Long mallId);

    MessageReplyRule saveOrUpdate(MessageReplyRuleDto dto);

    MessageReplyRule findRuleByIdAndMallId(Long id, Long mallId);

    void deleteKeywordAndContentByRuleId(Long ruleId);

    MessageReplyRuleDto findRuleKeywordContentByIdAndMallId(Long id, Long mallId);

    void delete(Long id, Long mallId);

    List<MessageReplyRuleDto> findRulesByMallId(Long mallId);

    List<MessageReplyRule> findRulesByKeywordAndMallId(String keyword, Long mallId);

    MessageReplyRuleContent findRuleContentByRuleId(Long ruleId);

    List<MessageReplyRuleContent> findRuleContentsByRuleId(Long ruleId);
}
